#!/bin/bash                                                                                                                                    

# Note: This script assumes that you are starting the HAJournalServer                                                                          
# from the root of an SVN checkout and that you have already done an                                                                           
# "ant bundleJar".  Zookeeper must be configured through it's "conf"                                                                           
# directory.  The HAJournalServer instances are configured through                                                                             
# their configuration files (HAServer*.config). Zookeeper and Jini                                                                             
# (ClassServer and service registrar) should be running before you                                                                             
# start the HAJournalServer instances.                                                                                                         

# The HTTPD server for downloadable code (ClassServer).                                                                                        

CODEBASE_PORT=23333

# The federation name (used to govern which services will join with                                                                            
# which registars, the service directory path in the file system, and
# the root znode for the HA replication cluster in zookeeper).

FEDNAME=benchmark

# The HAJournalServer configuration file.  It is possible to use the                                                                           
# same configuration file for all HAJournals that are part of the same                                                                         
# logical service if you do not specify a ServiceID (one will be                                                                               
# assigned automatically) and if all HAJournal services are running on                                                                         
# different nodes (so they do not have a conflict in their assigned                                                                            
# ports for the replication pipeline). The configuration settings must                                                                         
# be consistent for all services in the same logical service, must be                                                                          
# consistent with zookeeper, and must be consistent with Jini/River.                                                                           
# Only HAJournals that are part of the same logical service will meet                                                                          
# in a quorum. See the javadoc and the configuration files for more                                                                            
# details.                                                                                                                                     

HAJOURNAL_CONFIG=src/resources/HAJournal/HAJournal.config

# The java security file.                                                                                                                      

POLICY_FILE=policy.all

# The log4j configuration file. Each service will log locally unless                                                                           
# you provide otherwise in your logging configuration.                                                                                         

LOG4J_CONFIG=file:src/resources/HAJournal/log4jHA.properties

# The java logging configuration file. Each service will log locally unless
# you provide otherwise in your logging configuration.                                                                                         

LOGGING_CONFIG=src/resources/HAJournal/logging.properties

# The directory for the jini libraries.                                                                                                        

JINI_LIB=bigdata-jini/lib/jini/lib

# The directory for the jini libraries containing downloadable code.                                                                           

JINI_LIBDL=bigdata-jini/lib/jini/lib-dl

# Hack builds a classpath.                                                                                                                     

CLASSPATH=`find ant-build/lib -name '*.jar' -printf "%p:"`

# Java options for the HAJournalServer instances.

JAVAOPTS="-server -Xmx4G -XX:MaxDirectMemorySize=3000m"
